package com.mtons.mblog.modules.entity;

import lombok.Data;

import java.io.Serializable;

import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 小神灯的火焰
 * 学习内容
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "learn_content")
public class LearnContent implements Serializable {

	/**
	 * null
	 * default value: null
	 */
	@Id
	@Column(name = "id", nullable = false, length = 32)
	private String id;

	/**
	 * 文档类型 0-内容卡片 1-单词卡片 2-问答卡片
	 * default value: null
	 */
	@Column(name = "content_type", nullable = true, length = 8)
	private String contentType;

	/**
	 * 内容集合 0或者空为全部卡片，其他为具体，属于字典类型
	 * default value: null
	 */
	@Column(name = "content_type_id", nullable = true, length = 32)
	private String contentTypeId;

	/**
	 * 状态。0-未生效 1-生效  2-归档
	 * default value: null
	 */
	@Column(name = "status", nullable = true, length = 1)
	private String status;

	/**
	 * 生效日期
	 * default value: null
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "valid_time", nullable = true)
	private java.util.Date validTime;

	/**
	 * 创建时间
	 * default value: null
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "create_time", nullable = true)
	private java.util.Date createTime;

	/**
	 * 创建用户
	 * default value: null
	 */
	@Column(name = "create_user", nullable = true, length = 32)
	private String createUser;

	/**
	 * 更新时间
	 * default value: null
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "update_time", nullable = true)
	private java.util.Date updateTime;

	/**
	 * 更新用户id
	 * default value: null
	 */
	@Column(name = "update_user", nullable = true, length = 32)
	private String updateUser;
}
